import {  GloableResponseItem, ResponseEnum } from '@/utils/request/res';

export abstract class BaseController {
  static async handleRequest(request: any, handler: Function) {
    try {
      return await handler(request);
    } catch (error) {
      console.log(error);
      return GloableResponseItem(ResponseEnum.fail, "请求处理失败", null);
    }
  }
}